home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / include / sys / ioccom.h.notused < prev    next >
Encoding:
Text File  |  1991-11-05  |  2.8 KB  |  82 lines

  1. /*    @(#)ioccom.h 1.7 89/06/16 SMI; from UCB ioctl.h 7.1 6/4/86    */
  2.  
  3. /*
  4.  * Copyright (c) 1982, 1986 Regents of the University of California.
  5.  * All rights reserved.  The Berkeley software License Agreement
  6.  * specifies the terms and conditions for redistribution.
  7.  */
  8.  
  9. #ifndef    __sys_ioccom_h
  10. #define    __sys_ioccom_h
  11.  
  12. /*
  13.  * Ioctl's have the command encoded in the lower word,
  14.  * and the size of any in or out parameters in the upper
  15.  * word.  The high 2 bits of the upper word are used
  16.  * to encode the in/out status of the parameter; for now
  17.  * we restrict parameters to at most 255 bytes.
  18.  */
  19. #define    _IOCPARM_MASK    0xff        /* parameters must be < 256 bytes */
  20. #define    _IOC_VOID    0x20000000    /* no parameters */
  21. #define    _IOC_OUT    0x40000000    /* copy out parameters */
  22. #define    _IOC_IN        0x80000000    /* copy in parameters */
  23. #define    _IOC_INOUT    (_IOC_IN|_IOC_OUT)
  24. /* the 0x20000000 is so we can distinguish new ioctl's from old */
  25. #define    _IO(x,y)    (_IOC_VOID|('x'<<8)|y)
  26. #define    _IOR(x,y,t)    (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  27. #define    _IORN(x,y,t)    (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  28. #define    _IOW(x,y,t)    (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  29. #define    _IOWN(x,y,t)    (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  30. /* this should be _IORW, but stdio got there first */
  31. #define    _IOWR(x,y,t)    (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  32. #define    _IOWRN(x,y,t)    (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  33.  
  34. /*
  35.  * Registry of ioctl characters, culled from system sources
  36.  *
  37.  * char    file where defined        notes
  38.  * ----    ------------------        -----
  39.  *   F    sun/fbio.h
  40.  *   G    sun/gpio.h
  41.  *   H    vaxif/if_hy.h
  42.  *   M    sundev/mcpcmd.h            *overlap*
  43.  *   M    sys/modem.h            *overlap*
  44.  *   S    sys/stropts.h
  45.  *   T    sys/termio.h            -no overlap-
  46.  *   T    sys/termios.h            -no overlap-
  47.  *   V    sundev/mdreg.h
  48.  *   a    vaxuba/adreg.h
  49.  *   d    sun/dkio.h            -no overlap with sys/des.h-
  50.  *   d    sys/des.h            (possible overlap)
  51.  *   d    vax/dkio.h            (possible overlap)
  52.  *   d    vaxuba/rxreg.h            (possible overlap)
  53.  *   f    sys/filio.h
  54.  *   g    sunwindow/win_ioctl.h        -no overlap-
  55.  *   g    sunwindowdev/winioctl.c        !no manifest constant! -no overlap-
  56.  *   h    sundev/hrc_common.h
  57.  *   i    sys/sockio.h            *overlap*
  58.  *   i    vaxuba/ikreg.h            *overlap*
  59.  *   k    sundev/kbio.h
  60.  *   m    sundev/msio.h            (possible overlap)
  61.  *   m    sundev/msreg.h            (possible overlap)
  62.  *   m    sys/mtio.h            (possible overlap)
  63.  *   n    sun/ndio.h
  64.  *   p    net/nit_buf.h            (possible overlap)
  65.  *   p    net/nit_if.h            (possible overlap)
  66.  *   p    net/nit_pf.h            (possible overlap)
  67.  *   p    sundev/fpareg.h            (possible overlap)
  68.  *   p    sys/sockio.h            (possible overlap)
  69.  *   p    vaxuba/psreg.h            (possible overlap)
  70.  *   q    sun/sqz.h
  71.  *   r    sys/sockio.h
  72.  *   s    sys/sockio.h
  73.  *   t    sys/ttold.h            (possible overlap)
  74.  *   t    sys/ttycom.h            (possible overlap)
  75.  *   v    sundev/vuid_event.h        *overlap*
  76.  *   v    sys/vcmd.h            *overlap*
  77.  *
  78.  * End of Registry
  79.  */
  80.  
  81. #endif /* !__sys_ioccom_h */
  82.